﻿Imports DTO
Imports DAO

Public Class LoaiBUS
    Public Shared Function LayTheoID(ByVal id As Integer) As LoaiDTO
        Dim lDAO As New LoaiDAO()
        Return lDAO.LayID(id)
    End Function

    Public Shared Function LayTatCa() As IList
        Dim lDAO As New LoaiDAO()
        Return lDAO.LayTatCa()
    End Function

    Public Shared Function LayTatCaTT() As DataTable
        Dim lDAO As New LoaiDAO()
        Return lDAO.LayTatCaTT()
    End Function

    Public Shared Sub Themloai(ByVal loai As LoaiDTO)
        Dim lDAO As New LoaiDAO()
        lDAO.ThemLoai(loai)
    End Sub

    Public Shared Sub Capnhap(ByVal loai As LoaiDTO)
        Dim lDAO As New LoaiDAO()
        lDAO.CapNhapLoai(loai)
    End Sub


    Public Shared Sub Delete(ByVal id As Integer)
        Dim lDAO As New LoaiDAO()
        lDAO.XoaLoai(id)
    End Sub
End Class
